package com.zjitc.config;

import com.zjitc.obj.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/3/6 15:56
 * @description:
 */
@Configuration   /*出现configuration注解  相当于 xml 文件*/
public class JavaConfigDemo1 {
 @Bean
 @Scope(value = "prototype")
  public User user(){
  return new User("name is pig",11);
}
/*@Bean(value = "u2")
public User user2(){
    return new User("name is dog",22);
}*/
}
